<template>
    <div class="person">
        now sum is {{ sum }}
        <button @click="add">sum +1</button>
        <button @click="getDog">再来一只狗</button>
        <hr>
        <img v-for="(dog, index) in dogList" :src="dog" :key="index">
        <br>
    </div>
</template>

<script setup lang="ts" name='Person'>
import useSum from '@/hooks/useSum';
import useDog from '@/hooks/useDog';


const { sum, add } = useSum()
const { dogList, getDog } = useDog()

</script>

<style scoped>
.person {
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
}

button {
    margin: 0 10px;
}

li {
    font-size: 20px;
}

img {
    height: 100px;
    margin-right: 10px;
}
</style>